/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dao;

import java.sql.ResultSet;
import util.MySQLDataAccessHelper;

/**
 *
 * @author Rocker000
 */
public class ThamSo_dao 
{
    public static int SoSanPhanTrenTrang()
    {
        int soluong = -1;
        String sql = "select sosanphamtrentrang from thamso";
        MySQLDataAccessHelper helper  = new MySQLDataAccessHelper();
        helper.Open();
        ResultSet rs = helper.ExeCuteQuery(sql);
        try
        {
            while(rs.next())
                soluong = rs.getInt("sosanphamtrentrang");
        }
        catch(Exception ex)
        {
            System.out.println(ex.getMessage());
        }
        helper.Close();
        return soluong;        
    }
    
}
